//
//  KKNetworkingManager.h
//  iFlyQDMG
//
//  Created by ifly on 2017/8/8.
//  Copyright © 2017年 Meiyang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "KKNetworkingObject.h"

@interface KKNetworkingManager : NSObject

/**
 *   GET请求通过Block 回调结果
 *
 *   @param url          url
 *   @param paramsDict   paramsDict
 *   @param successBlock  成功的回调
 *   @param failureBlock  失败的回调
 *   @param progress      进度回调
 *   @param refreshCache 是否刷新缓存。由于请求成功也可能没有数据，对于业务失败，只能通过人为手动判断
 */
+ (KKURLSessionTask *)getRequstWithURL:(NSString *)url
                                 params:(NSDictionary *)paramsDict
                           successBlock:(KKResponseSuccess)successBlock
                           failureBlock:(KKResponseFail)failureBlock
                               progress:(KKGetProgress)progress
                           refreshCache:(BOOL)refreshCache;


#pragma mark - 发送 POST 请求的方法
/**
 *   通过 Block回调结果
 *
 *   @param url           url
 *   @param paramsDict    请求的参数字典
 *   @param successBlock  成功的回调
 *   @param failureBlock  失败的回调
 *   @param progress      进度回调
 *   @param refreshCache 是否刷新缓存。由于请求成功也可能没有数据，对于业务失败，只能通过人为手动判断
 */
+ (KKURLSessionTask *)postReqeustWithURL:(NSString*)url
                                   params:(NSDictionary*)paramsDict
                             successBlock:(KKResponseSuccess)successBlock
                             failureBlock:(KKResponseFail)failureBlock
                                 progress:(KKGetProgress)progress
                             refreshCache:(BOOL)refreshCache;




@end
